const path = require('path');
module.exports = {
    devServer: {
        port: 8081,
        open: true,
    },
    lintOnSave: false,
    chainWebpack: (config) => {
        config.resolve.alias
            .set("@", path.join(__dirname, "src"))
            .set("@cpn", path.join(__dirname, "src/components"))
            .set("@views", path.join(__dirname, "src/views"))
            .set("@util", path.join(__dirname, "src/util"))
            .set("@api", path.join(__dirname, "src/api"))
            .set("@assets", path.join(__dirname, "src/assets"))
        config.module
            .rule('md')
            .test(/\.md$/)
            .use('html-loader')
            .loader('html-loader')
            .end()
            .use('markdown-loader')
            .loader('markdown-loader')
            .end()
    }
}